package com.yst.webplugin.annotation;



import java.io.Serializable;
import java.lang.annotation.*;
import java.util.LinkedHashMap;

@ResultType(resultTypes = {LinkedHashMap.class}, returnModelClass = true)
@Target({ElementType.FIELD,ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface QuerySingleRow {
    /**
     * class of query result
     */
    Class<?> modelClass() default LinkedHashMap.class;

    /**
     * parameter of valid
     */
    Class<? extends Serializable> validClass() default Default.class;
    /**
     * valid group
     */
    Class<?>[] validClassGroup() default {};
    /**
     * name of query, if value is empty,then use field name
     */
    String name();

    /**
     * sql script or name of sql, if value is empty,then use field name
     */
    String sqlOrSqlName() default "";

    /**
     * unselect fields
     */
    String[] disabledFields() default {};
}
